//test1.cpp
#include<iostream>
#include<string>
using namespace std;

int main()
{
    const int max = 30;
    int student[max] = {0};
    unsigned long quiz = 0;
    int j,k;
    for(auto i:student)
        quiz |= 1UL << i;

    cout<<"input the qualified students:"<<endl<<endl;
    while(cin>>j)
    {
        if (j > max || j <= 0) continue;
        quiz |= 1UL << j;
    }
    cout<<endl;

    cout<<"the qualified students:"<<endl<<endl<<endl;
    for(k = 1 ; k <= max ; k++)
    {
        bool m = quiz & (1UL << k);
        cout << "[" << k << "]" << "\t" << m <<"\t";
        if(k%5==0) cout<<endl<<endl;
    }

    getchar();
    return 0;
}
